Various network service functions (SF), for example, a TCP accelerator, a firewall, and a video accelerator, that can process a network service flow are generally deployed in an operator network, these SFs are deployed at fixed locations (statically deployed at a location in a network topology) by an operator, and when passing through the network, the network service flow successively passes through the SFs in the network according to an operator configuration. When each SF is deployed in a network in the foregoing static manner, after deployment of the SF is completed, a location of the SF in the network does not change. As a result, regardless of how to process network service flows, all the network service flows need to pass through all SFs one time, and a processing sequence thereof is unique, which cannot meet a function that the network service flows need to pass through the SFs in different sequences. For the problem, a network standardization organization puts forward the concept of a service function chain (SFC).
In an architecture in which an existing network implements an SFC function, main function entities include: an SFC controller, various SF instances sfs (that is, a specific instance of an SF, for example, a specific firewall device sf1), a classifier, a service forwarding device, and an underlying network forwarding device (for example, a layer 3 router or a layer 2 exchange). After the SFC Controller receives a service chain service request message (service chain request), if there is a specific instance SFP of an SFC that can be used, the SFP includes each specific sf providing an SFC function, and each sf has low load, the SFC Controller selects the SFP to provide a network service to a requested network service flow. In this case, the SFC Controller needs to add a match rule in the request message to a match rule corresponding to an SFP ID in the classifier, and the SFC Controller may also select a corresponding SF instance according to a requested SF in the service chain request message, and then generate a new SFP, and allocate a new SFP ID to the SFP. In a process of selecting an SF instance, if a same SF has multiple available instances, the SFC Controller selects an SF instance having low load from the multiple SF instances.
Because multiple specific instances sfs may be deployed for one SF in an actual network deployment, according to an existing technical solution, to implement load balancing, the SFC Controller selects any sf corresponding to an SF. If existence of a large quantity of sfs leads to existence of a large quantity of SFPs, in this case, the SFC Controller is responsible for allocating a unique SFP ID to each SFP, a corresponding service forwarding device SFF needs to store a forwarding entry corresponding to each SFP ID, and therefore, a large quantity of signaling is required to configure SFP information on the SFF, large signaling overheads are required, the corresponding SFF needs to maintain a large quantity of forwarding entries and needs large storage space, and forwarding efficiency is low.